<?php
    $arr = array (
        "host" => "localhost",
        "userName" => "root",
        "password" => "",
        "dbName" => "tianmao"
    );
    mysql_connect($arr['host'],$arr['userName'],$arr['password']);
    mysql_select_db($arr['dbName']);
    mysql_query("set charset 'utf8'");
    mysql_query("set character set 'utf8'");

?>